#!/usr/bin/env bash

# 镜像导出
# docker save ab2bc7245998 > nlpservice_docker_iamges.tar nlpservice:v1
# nlpservice_docker_iamges.tar为目标文件，nlpservice:v1是源镜像名（name:tag）
# 镜像导入
# docker load < nlpservice_docker_iamges.tar


CONTAINER_NAME=$1

# 判断是否传参
if [ ! "${CONTAINER_NAME}" ];then
    echo "请输入是哪个容器,示例：
          开发环境：sh enter_docker.sh nlpservice_dev
          测试环境：sh enter_docker.sh nlpservice_devtest
          线上环境：sh enter_docker.sh nlpservice"
    exit 0
fi


# 进入docker伪终端
docker exec -it ${CONTAINER_NAME} /bin/bash